<template>
	<div class="custom_button">
		<a href="javascript:;" @click="buttonClickHandle">
			<slot name="goods"></slot>
			<slot name="comment"></slot>
			<slot name="shareinfo"></slot>
			<slot name="collect"></slot>
			<slot name="home"></slot>
			<slot name="signout"></slot>
		</a>
	</div>
</template>
<script>
	export default {
		name: 'custom_button',
		props:["slottype"],
		data: function(){
			return {
				
			}
		},
		methods:{
			buttonClickHandle: function(){
				console.log(this.$props.slottype)
				switch(parseFloat(this.$props.slottype)){
					case 1:
						this.$emit("buttonGoodsClickHandle");
						break;
					case 3:
						this.$emit("buttonShareClickHandle");
						break;
					case 4:
						this.$emit("buttonCollectClickHandle");
						break;
					case 13:
						this.$emit("showUpdateFile");
						break;
					case 11:
						this.$emit("gohomeClickHandle");
						break;
					case 12:
						this.$emit("goSeachClickHandle");
						break;
					case 14:
						this.$emit("goGoodsClickHandle");
						break;
					case 15:
						this.$emit("goUserClickHandle");
						break;
					case 20:
						this.$emit("buttonSignOutClickHandle");
						break;
				}
			}
		}
	}
</script>
<style lang="less">
	@base:23.44/1rem;
	.custom_button{
		a{
			display: block;
			margin:0 5/@base;
			padding:10/@base;
		}
	}
</style>